package wangwenjun.phase1.reference;

import lombok.extern.slf4j.Slf4j;

/**
 * @author ChangLiang
 * @date 2020/6/16
 */
@Slf4j
public class Reference {

    // 1M
    private final byte[] data = new byte[1024 * 1024];

    // 注意 2<<1 = 4 所以1M 可以写为2<<19 如果 2<<20 就是2M了
//    private final byte[] data = new byte[2<<19];

    @Override
    protected void finalize() throws Throwable {
        log.info("the reference will be GC");
    }
}
